package com.nightpiter.controller.algorithms.exceptions;

import com.nightpiter.model.objects.Station;

/**
 * NoWayDijkstraException class. Should be thrown when there is no way between
 * two stations
 * 
 * @author Eldar Abusalimov (eldar.abusalimov@gmail.com)
 */
@SuppressWarnings("serial")
public class NoWayDijkstraException extends DijkstraException {
	/**
	 * standard error message
	 */
	private static final String MESSAGE = "There is no way between this stations";

	/**
	 * constructor without arguments
	 */
	public NoWayDijkstraException() {
		super(MESSAGE);
	}

	/**
	 * @param detailMessage
	 */
	public NoWayDijkstraException(String detailMessage) {
		super(MESSAGE + " : " + detailMessage);
	}

	/**
	 * @param throwable
	 */
	public NoWayDijkstraException(Throwable throwable) {
		super(throwable);
	}

	/**
	 * @param detailMessage
	 * @param throwable
	 */
	public NoWayDijkstraException(String detailMessage, Throwable throwable) {
		super(MESSAGE + " : " + detailMessage, throwable);
	}

	/**
	 * @param stationFrom
	 * @param stationTo
	 */
	public NoWayDijkstraException(Station stationFrom, Station stationTo) {
		super(MESSAGE + " : " + stationFrom.getName() + " and "
				+ stationTo.getName());
	}
}
